home *** CD-ROM | disk | FTP | other *** search
/ Scene Storm / Scene Storm - Volume 1.iso / coding / c / dependantscan / source / dependantscan.h < prev    next >
C/C++ Source or Header  |  1995-11-14  |  6KB  |  105 lines

  1. #if !defined DEF_DEPENDANTSCAN_H
  2. #define DEF_DEPENDANTSCAN_H
  3.  
  4. #define DPS_DEFAULT_PROJECT        "Executable"                  /* the defaults for our arguments */
  5. #define DPS_DEFAULT_MATCH            "#?.c"
  6. #define DPS_DEFAULT_MAKEFILE        "SMakeFile"
  7. #define DPS_DEFAULT_OBJECT_DIR    "Object/"
  8. #define DPS_DEFAULT_FILESONLINE    5
  9.  
  10. #define DPS_DEFAULT_FROM            "LIB:c.o"
  11. #define DPS_DEFAULT_LIBRARY        "lib:sc.lib + lib:amiga.lib"
  12.  
  13. #define DPS_SCOPTIONS_FILENAME    "SCOptions"                   /* the name of the file that SAS/C puts it's options into */
  14. #define DPS_PROGRAMNAME_STRING    "PROGRAMNAME="                /* the value in the scoptions file that specifies the project name */
  15. #define DPS_OBJECTNAME_STRING    "OBJECTNAME="                        /* the value in the scoptions file that specifies the object file directory */
  16.  
  17. #define DPS_LINE_BUFFER_SIZE        256                                    /* size of buffer for buffering file I/O */
  18.  
  19. enum DependantScanMessages                                                    /* index into DPSMessageText[] */
  20. {
  21.     DPS_ARG_PATH,                                                                /* [PATH path] the name of the directory to be scanned */
  22.     DPS_ARG_PROJECT,                                                            /* [PROJECT project] the name of the file the make file will create */
  23.     DPS_ARG_MATCH,                                                                /* [MATCH pattern] the files to be scanned */
  24.     DPS_ARG_MAKEFILE,                                                            /* [MAKEFILE makefile] the name of the file we create */
  25.     DPS_ARG_RULES,                                                                /* [RULES rules] a file to be inserted at the top of the makefile */
  26.     DPS_ARG_OBJECT_DIR,                                                        /* [OBJECT_DIR object_dir] the directory to hold temporary files */
  27.     DPS_ARG_FILESONLINE,                                                        /* [FILESONLINE filesonline] maximum number of files to put on each line of the makefile */
  28.     DPS_ARG_FROM,                                                                /* [FROM from] first item(s) (startup code) on the link line */
  29.     DPS_ARG_LIBRARY,                                                            /* [LIBRARY library] first item(s) on the library line */
  30.     DPS_ARG_VERBOSE,                                                            /* [VERBOSE] display progress */
  31.     DPS_ARG_COUNT,                                                                /* number of arguments above and below (twice) */
  32.     DPS_TEMPLATE_PATH,                                                        /* CLI template version of the path */
  33.     DPS_TEMPLATE_PROJECT,                                                    /* CLI template version of the project */
  34.     DPS_TEMPLATE_MATCH,                                                        /* CLI template version of the match */
  35.     DPS_TEMPLATE_MAKEFILE,                                                    /* CLI template version of the makefile */
  36.     DPS_TEMPLATE_RULES,                                                        /* CLI template version of the rules */
  37.     DPS_TEMPLATE_OBJECT_DIR,                                                /* CLI template version of the object directory */
  38.     DPS_TEMPLATE_FILESONLINE,                                                /* CLI template version of filesonline */
  39.     DPS_TEMPLATE_FROM,                                                        /* CLI template version of from */
  40.     DPS_TEMPLATE_LIBRARY,                                                    /* CLI template version of library */
  41.     DPS_TEMPLATE_VERBOSE,                                                    /* CLI template version of verbose */
  42.  
  43.     DPS_MSG_USAGE,                                                                /* what we display when the user types ? twice */
  44.     DPS_MSG_USE_PATH,                                                            /* help text for the PATH argument */
  45.     DPS_MSG_USE_PROJECT,                                                        /* help text for PROJECT */
  46.     DPS_MSG_USE_MATCH,                                                        /* help text for MATCH */
  47.     DPS_MSG_USE_MAKEFILE,                                                    /* help text for MAKEFILE */
  48.     DPS_MSG_USE_RULES,                                                        /* help text for RULES */
  49.    DPS_MSG_USE_OBJECT_DIR,                                                    /* help text for OBJECT_DIR */
  50.    DPS_MSG_USE_FILESONLINE,                                                /* help text for FILESONLINE */
  51.    DPS_MSG_USE_FROM,                                                            /* help text for FROM */
  52.    DPS_MSG_USE_LIBRARY,                                                        /* help text for LIBRARY */
  53.    DPS_MSG_USE_VERBOSE,                                                        /* help text for VERBOSE */
  54.  
  55.     DPS_MSG_PASS1_BEGINNING,                                                /* pass1 of the makefile generation is about to begin */
  56.     DPS_MSG_PASS1_PROGRESS,                                     /* processed a file on pass1 */
  57.     DPS_MSG_BUILDING_LINK_LIST,                                            /* the second part of pass1 is about to begin */
  58.    DPS_MSG_PASS2_BEGINNING,                                                /* pass2 of the makefile generation is about to begin */
  59.     DPS_MSG_PASS2_FILE,                                                        /* file being processed on pass2 */
  60.     DPS_MSG_PASS2_PROGRESS,                                                    /* found a header file in pass2 */
  61.     DPS_MSG_PASS2_SEPARATOR,                                                /* separation between files on pass2*/
  62.     DPS_MSG_INCLUDING_RULES,                                                /* a rules file is being included into the makefile */
  63.     DPS_MSG_CREATING_SMAKEFILE,                                            /* the name of the makefile being built */
  64.     DPS_MSG_CLOSING_SMAKEFILE,                                                /* the makefile is being closed */
  65.  
  66.     DPS_MSG_VERSION_NUMBER,                                                    /* so that the version program can print our version number */
  67.     DPS_MSG_DEPENDANTSCAN,                                                    /* name of our program */
  68.     DPS_MSG_DEPENDANTSCAN_ERROR,                                            /* the title of our error requester */
  69.     DPS_MSG_DARN,                                                                /* the button text of our error requester */
  70.     DPS_MSG_SUCCESSFUL,                                                        /* successful program operation */
  71.    DPS_MSG_DEPENDANTSCAN_MSG,                                                /* the title of our successful verbose requester */
  72.    DPS_MSG_COOL,                                                                /* the button text of a successful run */
  73.  
  74.     DPS_ERROR_CANNOT_OPEN_FILE,                                            /* could not open a file */
  75.     DPS_ERROR_CANNOT_WRITE_FILE,                                            /* could not write to a file */
  76.     DPS_ERROR_CANNOT_ALLOCATE,                                                /* could not allocate some memory */
  77.     DPS_ERROR_ALLOCDOSOBJECT,                                   /* call to AllocDosObject() failed */
  78.     DPS_ERROR_PASS_UNSUCCESSFUL,                                            /* could not perform a pass */
  79.  
  80.     DPS_MSG_COUNT                                                                /* number of messages above */
  81. };
  82. extern char *DPSArgument[DPS_ARG_COUNT];                       /* arguments parsed from the command line or our icon */
  83.  
  84. /* DependantScan.c */
  85. extern char *wrap_files(char *in_between);
  86. extern int dpscan_pass1(struct AnchorPath *anchor, char *in_between);
  87. extern int dpscan_pass2(struct AnchorPath *anchor, void *_not_used);
  88. extern int dps_build_path(char *destination, char *source);
  89. extern int dps_include_rules(char *filename);
  90. extern int dependant_scan(void);
  91.  
  92. /* ArgumentsDpS.c */
  93. extern void parse_scoptions_for_argument(char *scoptions_variable,int argument_number, char *line_buffer);
  94. extern void parse_scoptions_for_project(void);
  95. extern void parse_scoptions_for_object_dir(void);
  96. #if defined EXEC_TYPES_H
  97.     extern BOOL dps_get_shell_arguments(struct RDArgs *rdargs);
  98.     extern int dps_process_workbench_arguments(struct WBStartup *wb_startup);
  99. #endif
  100.  
  101. /* LocaleDpS.c */
  102. extern char *dps_locale_string(int message_index);
  103.  
  104. #endif
  105.